home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / nagscrn / nagscrn.frm (.txt) < prev    next >
Visual Basic Form  |  1997-06-15  |  7KB  |  201 lines

  1. VERSION 4.00
  2. Begin VB.Form frmNag 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "Nag Screen & Registration Information"
  6.    ClientHeight    =   3750
  7.    ClientLeft      =   1950
  8.    ClientTop       =   1485
  9.    ClientWidth     =   6510
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   1
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   4155
  21.    Left            =   1890
  22.    LinkTopic       =   "Form1"
  23.    MaxButton       =   0   'False
  24.    ScaleHeight     =   3750
  25.    ScaleWidth      =   6510
  26.    Top             =   1140
  27.    Width           =   6630
  28.    Begin Threed.SSPanel pnlMain 
  29.       Height          =   3750
  30.       Left            =   0
  31.       TabIndex        =   1
  32.       Top             =   0
  33.       Width           =   6510
  34.       _version        =   65536
  35.       _extentx        =   11483
  36.       _extenty        =   6615
  37.       _stockprops     =   15
  38.       backcolor       =   -2147483633
  39.       bevelouter      =   0
  40.       Begin Threed.SSPanel RegPanel 
  41.          Height          =   720
  42.          Left            =   990
  43.          TabIndex        =   4
  44.          Top             =   1755
  45.          Width           =   4620
  46.          _version        =   65536
  47.          _extentx        =   8149
  48.          _extenty        =   1270
  49.          _stockprops     =   15
  50.          backcolor       =   -2147483633
  51.          bevelouter      =   0
  52.          bevelinner      =   1
  53.          Begin Threed.SSCommand RegButton 
  54.             Height          =   600
  55.             Left            =   60
  56.             TabIndex        =   5
  57.             Top             =   60
  58.             Width           =   4485
  59.             _version        =   65536
  60.             _extentx        =   7911
  61.             _extenty        =   1058
  62.             _stockprops     =   78
  63.             caption         =   "Register Here"
  64.             BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  65.                name            =   "MS Sans Serif"
  66.                charset         =   1
  67.                weight          =   400
  68.                size            =   8.25
  69.                underline       =   0   'False
  70.                italic          =   0   'False
  71.                strikethrough   =   0   'False
  72.             EndProperty
  73.          End
  74.       End
  75.       Begin Threed.SSPanel pnlButton 
  76.          Height          =   720
  77.          Left            =   975
  78.          TabIndex        =   2
  79.          Top             =   2550
  80.          Width           =   4620
  81.          _version        =   65536
  82.          _extentx        =   8149
  83.          _extenty        =   1270
  84.          _stockprops     =   15
  85.          backcolor       =   -2147483633
  86.          bevelouter      =   0
  87.          bevelinner      =   1
  88.          Begin Threed.SSCommand btnExit 
  89.             Height          =   600
  90.             Left            =   60
  91.             TabIndex        =   3
  92.             Top             =   60
  93.             Width           =   4485
  94.             _version        =   65536
  95.             _extentx        =   7911
  96.             _extenty        =   1058
  97.             _stockprops     =   78
  98.             caption         =   "Exit Program"
  99.             BeginProperty font {FB8F0823-0164-101B-84ED-08002B2EC713} 
  100.                name            =   "MS Sans Serif"
  101.                charset         =   1
  102.                weight          =   400
  103.                size            =   8.25
  104.                underline       =   0   'False
  105.                italic          =   0   'False
  106.                strikethrough   =   0   'False
  107.             EndProperty
  108.          End
  109.       End
  110.       Begin VB.Label Label9 
  111.          Alignment       =   2  'Center
  112.          Appearance      =   0  'Flat
  113.          BackColor       =   &H80000005&
  114.          Caption         =   "UNREGISTERED COPY"
  115.          ForeColor       =   &H000000FF&
  116.          Height          =   195
  117.          Left            =   2265
  118.          TabIndex        =   7
  119.          Top             =   1155
  120.          Width           =   2040
  121.       End
  122.       Begin VB.Label Label1 
  123.          Appearance      =   0  'Flat
  124.          BackColor       =   &H80000005&
  125.          Caption         =   "This program is registered to:"
  126.          ForeColor       =   &H80000008&
  127.          Height          =   195
  128.          Left            =   2070
  129.          TabIndex        =   6
  130.          Top             =   885
  131.          Width           =   2490
  132.       End
  133.       Begin VB.Label lblMain 
  134.          Appearance      =   0  'Flat
  135.          AutoSize        =   -1  'True
  136.          BackColor       =   &H80000005&
  137.          Caption         =   $"NAGSCRN.frx":0000
  138.          BeginProperty Font 
  139.             name            =   "MS Sans Serif"
  140.             charset         =   1
  141.             weight          =   400
  142.             size            =   8.25
  143.             underline       =   0   'False
  144.             italic          =   0   'False
  145.             strikethrough   =   0   'False
  146.          EndProperty
  147.          ForeColor       =   &H0000FFFF&
  148.          Height          =   585
  149.          Left            =   2055
  150.          TabIndex        =   0
  151.          Top             =   135
  152.          Width           =   2610
  153.          WordWrap        =   -1  'True
  154.       End
  155.    End
  156. Attribute VB_Name = "frmNag"
  157. Attribute VB_Creatable = False
  158. Attribute VB_Exposed = False
  159. Private Sub btnExit_Click()
  160.         ' Registration information is written to .INI file here.
  161.     I% = WritePrivateProfileString("Registration Info", "Serial", RegStat, INIFILENAME$)
  162.     I% = WritePrivateProfileString("Registration Info", "FirstName ", First, INIFILENAME$)
  163.     I% = WritePrivateProfileString("Registration Info", "LastName", Last, INIFILENAME$)
  164.     ' If no registration information is entered, second "nag"
  165.     ' screen is displayed here.
  166.     If RegStat <> SerialNum$ Then
  167.     frmTimr2.Show 1
  168.     End If
  169.     Unload Me
  170. End Sub
  171. Private Sub Form_Load()
  172.     'Center form on screen.
  173.     Left = (Screen.Width - Width) \ 2
  174.     Top = (Screen.Height - Height) \ 2
  175.     ' Get registration information from NAGSCRN.INI.
  176.     RegStat = Space$(31)
  177.     I% = GetPrivateProfileString("Registration Info", "Serial", "Unregistered Copy", RegStat, 30, INIFILENAME$)
  178.     RegStat = Left$(RegStat, I%)
  179.     RegStat = LTrim$(RTrim$(RegStat))
  180.     First = Space(31)
  181.     I% = GetPrivateProfileString("Registration Info", "FirstName", "First Name", First, 30, INIFILENAME$)
  182.     First = Left$(First, I%)
  183.     First = LTrim$(RTrim$(First))
  184.     Last = Space(31)
  185.     I% = GetPrivateProfileString("Registration Info", "LastName", "Last Name", Last, 30, INIFILENAME$)
  186.     Last = Left$(Last, I%)
  187.     Last = LTrim$(RTrim$(Last))
  188. If RegStat = SerialNum$ Then
  189.     RegPanel.Visible = False
  190.     RegButton.Visible = False
  191.     Label9.Caption = First + " " + Last
  192.     Label9.ForeColor = &H800000
  193.     Else
  194.     ' If registration information is not entered, "nag" screens are displayed here.
  195.     frmTimer.Show 1
  196. End If
  197. End Sub
  198. Private Sub RegButton_Click()
  199. RegNum.Show
  200. End Sub
  201.